package controller

import (
	"fmt"
	"github.com/astaxie/beego/logs"
)

func (this BaseController) IgnoreErrors(err error) {
	if err != nil {
		//啥也不处理
		logs.GetLogger("Error").Output(1, fmt.Sprintln(err))
	}
}

func (this BaseController) HandleErrors(err error) {
	if err != nil {
		logs.GetLogger("Error").Output(1, fmt.Sprintln(err))
		this.ReturnError(0, err.Error(), "")
		this.StopRun()
	}
}
func (this BaseController) Try(err error) {
	if err != nil {
		logs.GetLogger("Error").Output(4, fmt.Sprintln(err))
	}

}
